package com.eight.cloud.payment.service;

import com.eight.cloud.client.model.dto.PlatformOrderDto;
import com.eight.cloud.client.model.vo.OrderVo;
import com.eight.cloud.client.model.vo.RefundVo;
import com.eight.cloud.payment.common.enums.PayStrategyEnum;
import com.eight.cloud.payment.model.vo.SubPayOrderVo;
import com.eight.cloud.payment.model.vo.SubRefundOrderVo;

/**
 * @ClassName: IThirdPayService
 * @Description: 第三方支付策略类
 * @Author: TXC
 * @Date: 2024-12-26 09:59
 **/
public interface IThirdPayService {

    /**
     * 支付
     *
     * @param order 订单信息
     * @return 二维码信息
     */
    String thirdPay(PayStrategyEnum payStrategyEnum, PlatformOrderDto order);


    /**
     *  退款
     *
     * @param refundOrder 退款信息
     * @param notifyUrl 回调地址
     * @return 结果
     */
    String refund(PayStrategyEnum payStrategyEnum, SubRefundOrderVo refundOrder, String notifyUrl);

    /**
     * 退款订单查询
     *
     * @param subRefundOrder 退款订单
     * @return 详情
     */
    RefundVo queryByOutRefundNo(PayStrategyEnum payStrategyEnum, SubRefundOrderVo subRefundOrder);


    /**
     * 根据流水号查询订单
     *
     * @param subPayOrder 系统订单信息
     * @return 结果
     */
    OrderVo queryOrderById(PayStrategyEnum payStrategyEnum, SubPayOrderVo subPayOrder);

    /**
     * 根据商户订单号查询订单
     *
     * @param subPayOrder 系统订单信息
     * @return 结果
     */
    OrderVo queryOrderByOutTradeNo(PayStrategyEnum payStrategyEnum, SubPayOrderVo subPayOrder);

    /**
     * 关闭订单
     *
     * @param subPayOrder 系统订单信息
     * @return 结果
     */
    String closeOrder(PayStrategyEnum payStrategyEnum, SubPayOrderVo subPayOrder);
}
